<?php
namespace Admin\Model;
use Think\Model;
/**
 *  ArticleModel
 */
class ArticleModel extends BaseModel {
    protected $tableName = 'cx_article';

    public function getArticleList($where='') {
        $list = $this->where($where)->select();
        return $list;
    }

    public function setValid($id) {
        $data['status'] = 1;
        return $this->where(array('id' => $id))->save($data);
    }

    public function getArticle($id) {
        $article = $this->where(array('id'=>$id))->find();
        return $article;
    }
}

?>